[SYCL] Add lightweight free-function kernel property headers#21738
Merged
dm-vodopyanov merged 11 commits intoMay 12, 2026
Conversation
8346075 to
295ad05
Compare
gmlueck
reviewed
Apr 11, 2026
gmlueck
reviewed
Apr 14, 2026
cperkinsintel
approved these changes
Apr 20, 2026
Contributor
cperkinsintel
left a comment
There was a problem hiding this comment.
header / sycl stuff LGTM
Introduce lightweight kernel-property headers for free-function kernel annotation and launch-tuning use cases: - function_properties.hpp provides a standalone path for execution-kind annotations such as nd_range_kernel and single_task_kernel. - function_launch_properties.hpp provides a lightweight path for launch properties such as work_group_size, work_group_size_hint, and sub_group_size. - kernel_properties/properties.hpp remains the umbrella path for full property-list semantics and cross-property conflict checking. This reduces compile-time cost for kernel-language and JIT-style usage while preserving the full umbrella interface for users who need complete property-list behavior. Measured header compile times: - function_properties.hpp: ~26 ms - function_launch_properties path: ~58 ms - kernel_properties/properties.hpp umbrella: ~68 ms
property headers instead of the nested kernel_properties/* paths. Keep the legacy kernel_properties/* headers as forwarding compatibility shims, add smoke tests for both legacy include paths, and mark the shims for deletion once support for the old paths is dropped.
ea6ac15 to
faa95e1
Compare
gmlueck
reviewed
May 7, 2026
gmlueck
reviewed
May 12, 2026
Contributor
gmlueck
left a comment
There was a problem hiding this comment.
Looks good! Just a minor comment about spec formatting below.
gmlueck
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor the oneAPI kernel-property headers to separate the lightweight free-function annotation path from the heavier generic property-list machinery.
This change introduces a lighter include path for code that defines free-function kernels and only needs function-level annotations, while keeping the broader property-list APIs available through the umbrella headers.
Current header organization:
free_function_kernel_properties.hppprovides the lightweight free-function path, including:single_task_kernelnd_range_kernelSYCL_EXT_ONEAPI_FUNCTION_PROPERTYkernel_properties.hppprovides the broader kernel-properties interface, including:properties_tagdevice_hasproperties.hppprovides the generic oneAPI properties list machinery:propertiesempty_properties_tThe previous nested include paths are kept as compatibility forwarding headers for now.
This split reduces compile-time overhead for kernel-language and JIT-style usage by avoiding unnecessary property-list metaprogramming on the free-function path.
A related semantic point is that generic
properties{...}lists remain composable on their own, while cross-property validation that depends on kernel usage is performed in the kernel-property consumption path rather than during generic property-list formation.This patch also updates the extension documentation to describe the current header organization in less prescriptive terms and adds compatibility coverage for the legacy forwarding headers.
Measured header compile times:
free_function_kernel_properties.hpp: ~29 mskernel_properties.hppumbrella path: ~68 ms